<?php defined('SYSPATH') or die('No direct script access.');
/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2020/05/28 11:25
 * Desc: 小程序权限相关控制
 */
class Model_Api_Standard_App
{

    // 获取应用权限
    public static function get_app_auth($siteId,$secret)
    {

        include_once  BASEPATH . "/plugins/api/vendor/xcx/stapi.php";
        //通过api接口获取站点权限
        $method = '/xcxapp/site_auth';
        $params = array(
            'siteId' => $siteId,
            'secret' => $secret
        );

        $api = new Stapi();
        $rtn = $api->http($method,$params);
        return $rtn;
    }


}